<?php
class TdLabel extends TdFormField {
	
  public $for;

  function __construct($id, $template="") {
    parent::__construct($id, $template);    
  } 

  function __toString() {
  	$pout = parent::__toString();
  	if ($pout != "") {
  		return $pout;
  	}
  	
    ob_start();

    print("<label");
    if (isset($this->for)) print(" for=\"".$this->for."\"");
    if (isset($this->cssclass)) print(" class=\"".$this->cssclass."\"");
    print(">");
    print($this->value);
    print("</label>");

    return ob_get_clean(); 
  }
  
  function setFor($value) {
    $this->for = $value;
  }
  function getFor() {
    return $this->for;
  }
}

?>
